/*
 * Group 3, User Interface Programming II (vt11)
 * Pooya | Flora | Monica | Can
 */
package vical.action;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import vical.model.Internationalization;
import vical.view.ViewPanel;
import vical.view.ViewPanel.ViewType;

/**
 * Switch the calendar area to month view.
 *
 * @author WoKe
 */
public class MonthViewAction extends AbstractAction {

    private ViewPanel viewPanel;

    public MonthViewAction(ViewPanel viewPanel) {
        super(Internationalization.getString("calendar_month_button"));
        putValue(MNEMONIC_KEY, Internationalization.getMnemonic("mnemonics_month_view_button"));
        this.viewPanel = viewPanel;
    }

    public void actionPerformed(ActionEvent e) {
        viewPanel.setViewType(ViewType.MonthView);
    }
}
